﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project.Ycm20250401.Service._20250407
{
    /// <summary>
    /// 折扣策略
    /// </summary>
    public class DiscountStrategy: IPriceStrategy
    {
        public bool IsMatch(ActivityType type) => type == ActivityType.Discount;
        public decimal CalculatePrice(decimal original, Activity activity)
            => original * (1 - activity.Discount);
    }
}
